<script>
export default {
	onLaunch: function() {
		console.log('App Launch');
	},
	onShow: function() {
		uni.hideTabBar();
		//#ifdef MP-WEIXIN
		uni.setStorageSync('indexType', 1);
		//#endif
		console.log('App Show');
		//#ifdef H5
		uni.setStorageSync('indexType', 2);
		let platform = uni.getSystemInfoSync().platform;
		//判断系统 解决ios系统右侧会出现显示滚动条 start
		if (platform == 'ios') {
			loadCssCode('body,html{overflow-x: hidden;}');
		} else {
			loadCssCode('body,html{overflow-x: hidden;}');
		}
		//动态加载css代码片段
		function loadCssCode(code) {
			var style = document.createElement('style');
			style.type = 'text/css';
			style.rel = 'stylesheet';
			//for Chrome Firefox Opera Safari
			style.appendChild(document.createTextNode(code));
			//for IE
			//style.styleSheet.cssText = code;
			var head = document.getElementsByTagName('head')[0];
			head.appendChild(style);
		}
		//#endif
	},
	onHide: function() {
		console.log('App Hide');
	},
};
</script>
<style lang="scss">
/* 注意要写在第一行，同时给style标签加入lang="scss"属性 */
@import '@/uni_modules/uview-ui/index.scss';
page {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	background: #f2f5f9;
}
view {
	box-sizing: border-box;
	font-family: PingFang SC-Bold, PingFang SC;
}
</style>
